<template>
	<view style="width: 100vw; height: 100vh;">
		<view class="content" v-for="(item,index) in dataInfo" :key="index">
			{{item}}
		</view>
		<QRCodeScanner @decodeText="onScan" />
	</view>
</template>

<script>
	import QRCodeScanner from '@/components/QRCodeScanner.vue';

	export default {

		data() {
			return {
				dataInfo: []
			}
		},
		components: {
			QRCodeScanner,
		},
		methods: {
			onScan(result) {
				this.dataInfo.push(result)
			}

		},
	};
</script>

<style scoped>
	.content {
		width: 100vw;
		height: 100vh;
	}
</style>